package com.liuwei.spring.cloud.configuration;

import com.liuwei.spring.cloud.framework.feigns.caller.FeignAuthTokenInterceptor;
import com.liuwei.spring.cloud.framework.feigns.caller.FeignBaggageInterceptor;
import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : FeignConfiguration
 * @version V1.0
 * @date: 2024/4/25 2:26 PM
 * @Description: TODO
 */
@Configuration
public class FeignConfiguration {

    /**
     * feign 拦截器
     * @return
     */
    @Bean
    public RequestInterceptor feignBaggageInterceptor() {
        return new FeignBaggageInterceptor();
    }

    /**
     * feign 拦截器
     * @return
     */
    @Bean
    public RequestInterceptor feignAuthTokenInterceptor() {
        return new FeignAuthTokenInterceptor();
    }
}
